﻿using System.Threading.Channels;
using Digitalmes.Core.Common.Interfaces;

namespace Digitalmes.Infrastructure.MessageBrokers;

/// <summary>
/// 默认的消息队列。
/// </summary>
/// <typeparam name="T"></typeparam>
internal sealed class DefaultChannelQueue<T> : ChannelQueueBase<T>, IMessageQueue<T>
{
    /// <summary>
    /// 默认容量。
    /// </summary>
    public const int DefaultCapacity = 8;

    public DefaultChannelQueue() : base(DefaultCapacity, BoundedChannelFullMode.DropOldest)
    {
    }
}
